-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only error when invalid maps are passed to base physics methods #1302
Conversation
… empty to allow end users to use in common interface in more cases.
/style |
src/serac/physics/base_physics.hpp
Outdated
{ | ||
SLIC_ERROR_ROOT(axom::fmt::format("Adjoint analysis not defined for physics module {}", name_)); | ||
if (string_to_dual.size()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're checking whether the map is populated here, I suggest using the empty()
method on STL containers, because the intent is clearer.
src/serac/physics/base_physics.hpp
Outdated
{ | ||
SLIC_ERROR_ROOT(axom::fmt::format("Adjoint analysis not defined for physics module {}", name_)); | ||
if (string_to_bc.size()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment.
use not empty
Allow some base physics interfaces to be used in cases where maps are empty to allow end users to use the common interface in more cases.